Repository navigation
fix: count only the tenant's baselines in the documentation header - #49
Merged
Merged
Conversation
The HTML header counted every baseline the credential can see, so a partner with 29 baselines showed "29 baselines" on every tenant, even with -Baseline filtering the report to one. It now counts the baselines the tenant is the source or a member of, shows no count when -Baseline is set (the "Baseline:" line already names it), and reads "1 product", "1 policy" and "1 baseline". Measured live: Inforcer Blueprint Library (beta) 29 -> 24, filtered to one baseline -> no count; Roytoso (v1) 10 -> 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the tenant-specific baseline count and report-label changes.
No open issues 🎉
What changed in this PR
Corrects baseline counts in tenant documentation HTML reports as part of the unreleased 1.0.0 release.
Changes:
- Limits baseline counts to baselines where the tenant is the source or a member.
- Hides the baseline count when
-Baselineis set and uses singular labels for counts of one. - Adds four regression tests and updates the changelog date and test totals.
| File | Description |
|---|---|
Tests/DocModel.Tests.ps1 |
Tests tenant-specific counts, filtered headers, and singular labels. |
module/Private/ConvertTo-InforcerHtml.ps1 |
Hides filtered baseline counts and handles singular count labels. |
module/Private/ConvertTo-InforcerDocModel.ps1 |
Filters baseline names by tenant source or membership. |
CHANGELOG.md |
Documents the fix and updates release metadata and test totals. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Export-InforcerTenantDocumentation -Format Htmlshowed the number of every baseline the credential can see in the report header ("29 baselines"), not the tenant's, and also with-Baselinefiltering the report to one baseline.Now the header:
baselineMsTenantIdandmembers[].msTenantId, both APIs);-Baselineis set: the "Baseline: …" line already names it;The bug predates 1.0.0 (it is in 0.8.0). 1.0.0 is not on PSGallery yet, so this ships as part of 1.0.0; the CHANGELOG entry is dated 2026-11-09.
Evidence
-Baseline 'Inforcer Blueprint Project - Microsoft Edge'Tests: 4 new in
Tests/DocModel.Tests.ps1; each fails on the old code. Full suite 856: 852 pass, 3 skipped, 1 known failure (settings-catalog integration, same as on main).🤖 Generated with Claude Code